<%@page contentType="text/html; charset=UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
	<title>上传EXCEL文件</title>
	<script type="text/javascript" src="../js/jquery-1.4.2.min.js"></script>
    <script type="text/javascript" src="../js/jquery-ui-1.7.2.custom.min.js"></script>
    <script type="text/javascript" src="jquery.uploadify.v2.1.0.js"></script>
    <script type="text/javascript" src="../js/swfobject.js"></script>
    <link href="../js/uploadify.css" rel="stylesheet" type="text/css"/>
   
	<style type="text/css">
        body {
            margin: 0 0;
            font-size: 12px;
        }

        .m2 {
            background: url('../images/bg.gif');
            padding-left: 3px;
            padding-top: 3px;
            border-bottom: solid 1px #99BBE8;
            height: 26px;

        }
        
        #fileQueue {
            margin-top: 2px;
            overflow: auto;
        }
    </style>
     <script type="text/javascript">

        function trim(str) {
            return str.replace(/(^\s*)|(\s*$)/g, "");

        }                                 
        jQuery(document).ready(function() {
            jQuery("#uploadify").uploadify({
                'script'        :  'uploadExcel.jsp',
                'uploader'       : '../js/uploadify.swf',
                'cancelImg'      : '../js/cancel.png',
                'folder'         : 'upload',
                'queueID'        : 'fileQueue',
                'auto'           : true,
                'multi'          : true,
                wmode            : 'transparent',
                height         : 23, // The height of the flash button
                width          : 70, //
                'fileDesc'     : '只能上传excel格式',
    			'fileExt'      : '*.xls;*.xlsx',
                'buttonImg'      : '../js/uploadBtn_bs.png',
                'sizeLimit'      : 20 * 1024 * 1024,
                displayData    : 'speed',
                onInit  :function(){$("#save").hide();},
                onSelect   :function(){$("#save").show(); $("#fixchange").height(95);},
                onCancel       : function(){$("#save").hide();$("#fixchange").height(28);},
                onComplete     : function(event, queueId, fileObj, response, data){window.alert("上传成功，这次上传了" + response + "条数据");}
            });
        });
    </script>
</head>
<body>
                
   <div class="m2">
	<span style="float:right;"> 温馨提示:支持批量上传文件，单个文件请不要超过20M。</span>
	<input id="uploadify" type="file"/>&nbsp;&nbsp;
   </div>
   <div id="fileQueue">
	<span style="font-size:14px" id="promptText" ></span>
   </div>
				
   <div class="m5"></div>
   <script type="text/javascript">
		var fileQueue_height = jQuery(window).height() - 32;
		jQuery("#fileQueue").css("height", fileQueue_height.toString() + "px");
   </script>
   <div class="clear"></div>
 
</body>
</html>